using System.ComponentModel.DataAnnotations.Schema;

namespace Lzfy_His_Service.Models
{
    public class VerifyInfo
    {
        public int Id { get; set; }
        
        [Column("input_date")]
        public DateTime? InputDate { get; set; }
        
        [Column("patient_id")]
        public string? PatientId { get; set; }
        
        [Column("verify_code")]
        public string? VerifyCode { get; set; }
        
        [Column("qr_code")]
        public string? QrCode { get; set; }
        
        [Column("refund_balance")]
        public decimal? RefundBalance { get; set; }
        
        [Column("user_id")]
        public string? UserId { get; set; }
        
        [Column("user_name")]
        public string? UserName { get; set; }
        
        [Column("pat_name")]
        public string? PatName { get; set; }
        
        [Column("id_number")]
        public string? IdNumber { get; set; }
        
        [Column("deleted")]
        public bool Deleted { get; set; } = false;
        
        [Column("deleted_time")]
        public DateTime? DeletedTime { get; set; }
        
        [Column("deleted_by")]
        public string? DeletedBy { get; set; }
    }

    public class VerifyInfoQueryRequest
    {
        public string? PatientId { get; set; }
        public string? VerifyCode { get; set; }
        public string? QrCode { get; set; }
        public string? PatName { get; set; }
        public string? IdNumber { get; set; }
        public DateTime? StartDate { get; set; }
        public DateTime? EndDate { get; set; }
        public int PageIndex { get; set; } = 1;
        public int PageSize { get; set; } = 10;
    }

    public class VerifyInfoQueryResponse
    {
        public List<VerifyInfo> Items { get; set; } = new List<VerifyInfo>();
        public int TotalCount { get; set; }
        public int PageIndex { get; set; }
        public int PageSize { get; set; }
        public int TotalPages => (int)Math.Ceiling((double)TotalCount / PageSize);
    }

    public class VerifyInfoCreateRequest
    {
        public string? PatientId { get; set; }
        public string? VerifyCode { get; set; }
        public string? QrCode { get; set; }
        public decimal? RefundBalance { get; set; }
        public string? UserId { get; set; }
        public string? UserName { get; set; }
        public string? PatName { get; set; }
        public string? IdNumber { get; set; }
    }

    public class VerifyInfoUpdateRequest
    {
        public int Id { get; set; }
        public string? PatientId { get; set; }
        public string? VerifyCode { get; set; }
        public string? QrCode { get; set; }
        public decimal? RefundBalance { get; set; }
        public string? UserId { get; set; }
        public string? UserName { get; set; }
        public string? PatName { get; set; }
        public string? IdNumber { get; set; }
    }
}